function getOption(xlist,yList,name,danwei){
    var option = {
        color:["#C23632","#C23632","#C23632"],
        tooltip: {trigger: 'axis',formatter: "时间：{b0}<br/>当前值：{c0}"},
        xAxis:  {type: 'category',boundaryGap: false,data: xlist},
        yAxis: {type: 'value',axisLabel: {formatter: '{value} '+danwei}},
        series: [{name:name,type:'line',data:yList,
                markPoint: {
                    data: [{type: 'max', name: '最大值'},{type: 'min', name: '最小值'}]
                },
                markLine: {
                    data: [[{symbol: 'none',x: '90%',yAxis: 'max'}, {
                            symbol: 'circle',
                            label: {normal: {position: 'start',formatter: '最大值'}},
                            type: 'max',
                            name: '最高点'
                        }]
                    ]
                }
            }
        ]
    };
    return option;
}


function getCo2GzOption(xList,yList,name,danwei){
    var option = {
        color: ['#5793f3', '#d14a61', '#675bba'],
        tooltip: {trigger: 'axis', formatter: "时间：{b0}<br/>当前值：{c0}"},
        xAxis: [{type: 'category',axisTick: {alignWithLabel: true},data: xList}],
        yAxis: [{type: 'value',axisLabel: {formatter: '{value} '+danwei}}],
        series: [{name: name,type: 'line',xAxisIndex: 0,smooth: true,data: yList,
                markPoint: {
                    data: [{type: 'max', name: '最大值'},{type: 'min', name: '最小值'}]},
                markLine: {
                    data: [[{symbol: 'none',x: '90%',yAxis: 'max'}, {
                            symbol: 'circle',
                            label: { normal: {position: 'start',formatter: '最大值'}},
                            type: 'max',
                            name: '最高点'
                        }]
                    ]
                }
            }
        ]
    };
    return option;
}

